﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YetAnotherChat.UserManagement.Interfaces;
using YetAnotherChat.UserManagement.Models;

namespace YetAnotherChat.EntityFrameworkDataAccess.RepositoryImp
{
    public class RoleRepository: GenericRepositoryBase<Role>, IRoleRepository
    {
        public Role[] GetAllRoles()
        {
            try
            {
                return _entitySet.AsNoTracking().ToArray();
            }
            catch (Exception ex)
            {
                _logger.Error(ex);
                throw;
            }
            
        }
    }
}
